<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>	
<!-- <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
		<script type="text/javascript" language="javascript" src="http://cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
		<script type="text/javascript" language="javascript" src="http://cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/3/dataTables.bootstrap.js"></script>
	
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/3/dataTables.bootstrap.css">
		<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/tabletools/2.2.2/css/dataTables.tableTools.css">
		<link rel="stylesheet" type="text/css" href="http://editor.datatables.net/examples/resources/bootstrap/editor.bootstrap.css">
 -->
</head>
<style>

</style>
<script>
$(document).ready(function() {
    var table = $('#sicTable').DataTable();
 
    $('#sicTable tbody').on( 'click', 'tr', function () {
        if ( $(this).hasClass('active') ) {
            $(this).removeClass('active');
        }
        else {
            table.$('tr.active').removeClass('active');
            $(this).addClass('active');
        }
    } );
	$("#sicTable tr").css('cursor', 'pointer');
	$('#sicTable tbody tr').click(function() {
	    var x = $(this).attr("name");
	   $('#sicCode').val(x);
	   $('#sicCode').text(x);
	 //  alert($('#addressID').text());
	 });
} );


</script>
<body>
<div style="width:800px;height:600px; margin:0 auto;">
<table id="sicTable" class="table table-striped table-bordered" cellspacing="0" width="100%">
			<thead>
				<tr>
					<th>Bussiness Name</th>
					<th>SIC Code</th>
		
				</tr>
			</thead>
			<tbody>
				<c:forEach var="sic" items="${listSIC}">
					<tr name="${sic.sicCode }">
					    <td>${sic.typeOfBussiness}</td>	
						<td>${sic.sicCode}</td>
						
						
					</tr>
				</c:forEach>
			</tbody>
		</table>
</div>
<div id="sicCode" style="display:'';"></div>
</body>
</html>                                		